<?php

/**
 * @author Martin Pernica
 * @copyright 2009
 */

class String{
	
	public static function toLower($string)
	{
		return mb_strtolower($string, 'UTF-8');
	}
	
	public static function toUpper($string)
	{
		return mb_strtoupper($string, 'UTF-8');
	}
	
	public static function capitalize($string)
	{
		return mb_convert_case($string, MB_CASE_TITLE, 'UTF-8');
	}
	
	public static function encodingFix($string, $encoding = 'UTF-8'){
		return @iconv('UTF-16', $encoding . '//IGNORE', iconv($encoding, 'UTF-16//IGNORE', $string));
	}
}

?>